import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class BillDetail extends StatefulWidget {
  @override
  _BillDetailState createState() => _BillDetailState();
}

class _BillDetailState extends State<BillDetail> with SingleTickerProviderStateMixin{
  TabController controller;
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    controller=TabController(vsync: this,length:3,initialIndex: 0);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title:Text('账单明细',
          style: TextStyle(
              fontSize: 30.sp,
              fontWeight: FontWeight.bold),),
        centerTitle: true,
        bottom: TabBar(
          controller: controller,
          tabs: [
            Tab(text: '全部',),
            Tab(text: '消费',),
            Tab(text: '充值',),

          ],
        ),
      ),
      body: TabBarView(
          controller: controller,
          children:[
            Text('全部'),
            Text('消费'),
            Text('充值'),
          ]
      ),
    );
  }
}
